package com.ccdt.tv.smartrecommend.model.db.dao;

import android.content.Context;
import android.database.sqlite.SQLiteDatabase;

import org.greenrobot.greendao.database.Database;

/**
 * Created by wudz on 2017/3/29.
 */

public class DbHelper extends DaoMaster.OpenHelper {
    public DbHelper(Context context, String name, SQLiteDatabase.CursorFactory factory) {
        super(context, name,factory);
    }

    @Override
    public void onUpgrade(Database db, int oldVersion, int newVersion) {
        super.onUpgrade(db, oldVersion, newVersion);
        //操作数据库的更新 有几个表升级都可以传入到下面
        MigrationHelper.migrate(db, RecordBeanDao.class);
    }
}
